home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 August / MW 8 2003 CD1.iso / Inside Macworld / Product News / gimp-1.2.4.sit / gimp-1.2.4 / devel-docs / libgimp / sgml / gimpselection.sgml < prev    next >
Encoding:
Text File  |  2003-05-20  |  22.8 KB  |  531 lines

  1. <refentry id="libgimp-gimpselection" revision="19 Jan 2001">
  2. <refmeta>
  3. <refentrytitle>gimpselection</refentrytitle>
  4. <manvolnum>3</manvolnum>
  5. <refmiscinfo>LIBGIMP Library</refmiscinfo>
  6. </refmeta>
  7.  
  8. <refnamediv>
  9. <refname>gimpselection</refname><refpurpose></refpurpose>
  10. </refnamediv>
  11.  
  12. <refsynopsisdiv><title>Synopsis</title>
  13. <synopsis>
  14.  
  15.  
  16.  
  17. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-bounds">gimp_selection_bounds</link>           (<link linkend="gint32">gint32</link> image_ID,
  18.                                              <link linkend="gboolean">gboolean</link> *non_empty,
  19.                                              <link linkend="gint">gint</link> *x1,
  20.                                              <link linkend="gint">gint</link> *y1,
  21.                                              <link linkend="gint">gint</link> *x2,
  22.                                              <link linkend="gint">gint</link> *y2);
  23. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-all">gimp_selection_all</link>              (<link linkend="gint32">gint32</link> image_ID);
  24. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-none">gimp_selection_none</link>             (<link linkend="gint32">gint32</link> image_ID);
  25. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-clear">gimp_selection_clear</link>            (<link linkend="gint32">gint32</link> image_ID);
  26. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-is-empty">gimp_selection_is_empty</link>         (<link linkend="gint32">gint32</link> image_ID);
  27. <link linkend="gint32">gint32</link>      <link linkend="gimp-selection-float">gimp_selection_float</link>            (<link linkend="gint32">gint32</link> image_ID,
  28.                                              <link linkend="gint32">gint32</link> drawable_ID,
  29.                                              <link linkend="gint">gint</link> offx,
  30.                                              <link linkend="gint">gint</link> offy);
  31. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-load">gimp_selection_load</link>             (<link linkend="gint32">gint32</link> channel_ID);
  32. <link linkend="gint32">gint32</link>      <link linkend="gimp-selection-save">gimp_selection_save</link>             (<link linkend="gint32">gint32</link> image_ID);
  33. <link linkend="gint">gint</link>        <link linkend="gimp-selection-value">gimp_selection_value</link>            (<link linkend="gint32">gint32</link> image_ID,
  34.                                              <link linkend="gint">gint</link> x,
  35.                                              <link linkend="gint">gint</link> y);
  36. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-grow">gimp_selection_grow</link>             (<link linkend="gint32">gint32</link> image_ID,
  37.                                              <link linkend="gint">gint</link> steps);
  38. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-shrink">gimp_selection_shrink</link>           (<link linkend="gint32">gint32</link> image_ID,
  39.                                              <link linkend="gint">gint</link> radius);
  40. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-invert">gimp_selection_invert</link>           (<link linkend="gint32">gint32</link> image_ID);
  41. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-feather">gimp_selection_feather</link>          (<link linkend="gint32">gint32</link> image_ID,
  42.                                              <link linkend="gdouble">gdouble</link> radius);
  43. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-sharpen">gimp_selection_sharpen</link>          (<link linkend="gint32">gint32</link> image_ID);
  44. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-border">gimp_selection_border</link>           (<link linkend="gint32">gint32</link> image_ID,
  45.                                              <link linkend="gint">gint</link> radius);
  46. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-translate">gimp_selection_translate</link>        (<link linkend="gint32">gint32</link> image_ID,
  47.                                              <link linkend="gint">gint</link> offx,
  48.                                              <link linkend="gint">gint</link> offy);
  49. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-selection-layer-alpha">gimp_selection_layer_alpha</link>      (<link linkend="gint32">gint32</link> layer_ID);
  50. </synopsis>
  51. </refsynopsisdiv>
  52.  
  53.  
  54.  
  55.  
  56.  
  57. <refsect1>
  58. <title>Description</title>
  59. <para>
  60.  
  61. </para>
  62. </refsect1>
  63.  
  64. <refsect1>
  65. <title>Details</title>
  66. <refsect2>
  67. <title><anchor id="gimp-selection-bounds">gimp_selection_bounds ()</title>
  68. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_bounds           (<link linkend="gint32">gint32</link> image_ID,
  69.                                              <link linkend="gboolean">gboolean</link> *non_empty,
  70.                                              <link linkend="gint">gint</link> *x1,
  71.                                              <link linkend="gint">gint</link> *y1,
  72.                                              <link linkend="gint">gint</link> *x2,
  73.                                              <link linkend="gint">gint</link> *y2);</programlisting>
  74. <para>
  75. Find the bounding box of the current selection.
  76. </para>
  77. <para>
  78. This procedure returns whether there is a selection for the
  79. specified image. If there is one, the upper left and lower right
  80. corners of the bounding box are returned. These coordinates are
  81. relative to the image.</para>
  82. <para>
  83.  
  84. </para><informaltable pgwide=1 frame="none" role="params">
  85. <tgroup cols="2">
  86. <colspec colwidth="2*">
  87. <colspec colwidth="8*">
  88. <tbody>
  89. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  90. <entry> The image.
  91. </entry></row>
  92. <row><entry align="right"><parameter>non_empty</parameter> :</entry>
  93. <entry> True if there is a selection.
  94. </entry></row>
  95. <row><entry align="right"><parameter>x1</parameter> :</entry>
  96. <entry> x coordinate of upper left corner of selection bounds.
  97. </entry></row>
  98. <row><entry align="right"><parameter>y1</parameter> :</entry>
  99. <entry> y coordinate of upper left corner of selection bounds.
  100. </entry></row>
  101. <row><entry align="right"><parameter>x2</parameter> :</entry>
  102. <entry> x coordinate of lower right corner of selection bounds.
  103. </entry></row>
  104. <row><entry align="right"><parameter>y2</parameter> :</entry>
  105. <entry> y coordinate of lower right corner of selection bounds.
  106. </entry></row>
  107. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  108. </entry></row>
  109. </tbody></tgroup></informaltable></refsect2>
  110. <refsect2>
  111. <title><anchor id="gimp-selection-all">gimp_selection_all ()</title>
  112. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_all              (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  113. <para>
  114. Select all of the image.
  115. </para>
  116. <para>
  117. This procedure sets the selection mask to completely encompass the
  118. image. Every pixel in the selection channel is set to 255.</para>
  119. <para>
  120.  
  121. </para><informaltable pgwide=1 frame="none" role="params">
  122. <tgroup cols="2">
  123. <colspec colwidth="2*">
  124. <colspec colwidth="8*">
  125. <tbody>
  126. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  127. <entry> The image.
  128. </entry></row>
  129. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  130. </entry></row>
  131. </tbody></tgroup></informaltable></refsect2>
  132. <refsect2>
  133. <title><anchor id="gimp-selection-none">gimp_selection_none ()</title>
  134. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_none             (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  135. <para>
  136. Deselect the entire image.
  137. </para>
  138. <para>
  139. This procedure deselects the entire image. Every pixel in the
  140. selection channel is set to 0.</para>
  141. <para>
  142.  
  143. </para><informaltable pgwide=1 frame="none" role="params">
  144. <tgroup cols="2">
  145. <colspec colwidth="2*">
  146. <colspec colwidth="8*">
  147. <tbody>
  148. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  149. <entry> The image.
  150. </entry></row>
  151. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  152. </entry></row>
  153. </tbody></tgroup></informaltable></refsect2>
  154. <refsect2>
  155. <title><anchor id="gimp-selection-clear">gimp_selection_clear ()</title>
  156. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_clear            (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  157. <para>
  158. Set the selection to none, clearing all previous content.
  159. </para>
  160. <para>
  161. This procedure sets the selection mask to empty, assigning the value
  162. 0 to every pixel in the selection channel.</para>
  163. <para>
  164.  
  165. </para><informaltable pgwide=1 frame="none" role="params">
  166. <tgroup cols="2">
  167. <colspec colwidth="2*">
  168. <colspec colwidth="8*">
  169. <tbody>
  170. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  171. <entry> The image.
  172. </entry></row>
  173. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  174. </entry></row>
  175. </tbody></tgroup></informaltable></refsect2>
  176. <refsect2>
  177. <title><anchor id="gimp-selection-is-empty">gimp_selection_is_empty ()</title>
  178. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_is_empty         (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  179. <para>
  180. Determine whether the selection is empty.
  181. </para>
  182. <para>
  183. This procedure returns non-zero if the selection for the specified
  184. image is not empty.</para>
  185. <para>
  186.  
  187. </para><informaltable pgwide=1 frame="none" role="params">
  188. <tgroup cols="2">
  189. <colspec colwidth="2*">
  190. <colspec colwidth="8*">
  191. <tbody>
  192. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  193. <entry> The image.
  194. </entry></row>
  195. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Is the selection empty?
  196. </entry></row>
  197. </tbody></tgroup></informaltable></refsect2>
  198. <refsect2>
  199. <title><anchor id="gimp-selection-float">gimp_selection_float ()</title>
  200. <programlisting><link linkend="gint32">gint32</link>      gimp_selection_float            (<link linkend="gint32">gint32</link> image_ID,
  201.                                              <link linkend="gint32">gint32</link> drawable_ID,
  202.                                              <link linkend="gint">gint</link> offx,
  203.                                              <link linkend="gint">gint</link> offy);</programlisting>
  204. <para>
  205. Float the selection from the specified drawable with initial offsets
  206. as specified.
  207. </para>
  208. <para>
  209. This procedure determines the region of the specified drawable that
  210. lies beneath the current selection. The region is then cut from the
  211. drawable and the resulting data is made into a new layer which is
  212. instantiated as a floating selection. The offsets allow initial
  213. positioning of the new floating selection.</para>
  214. <para>
  215.  
  216. </para><informaltable pgwide=1 frame="none" role="params">
  217. <tgroup cols="2">
  218. <colspec colwidth="2*">
  219. <colspec colwidth="8*">
  220. <tbody>
  221. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  222. <entry> ignored
  223. </entry></row>
  224. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  225. <entry> The drawable from which to float selection.
  226. </entry></row>
  227. <row><entry align="right"><parameter>offx</parameter> :</entry>
  228. <entry> x offset for translation.
  229. </entry></row>
  230. <row><entry align="right"><parameter>offy</parameter> :</entry>
  231. <entry> y offset for translation.
  232. </entry></row>
  233. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The floated layer.
  234. </entry></row>
  235. </tbody></tgroup></informaltable></refsect2>
  236. <refsect2>
  237. <title><anchor id="gimp-selection-load">gimp_selection_load ()</title>
  238. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_load             (<link linkend="gint32">gint32</link> channel_ID);</programlisting>
  239. <para>
  240. Transfer the specified channel to the selection mask.
  241. </para>
  242. <para>
  243. This procedure loads the specified channel into the selection mask.
  244. This essentially involves a copy of the channel's content in to the
  245. selection mask. Therefore, the channel must have the same width and
  246. height of the image, or an error is returned.</para>
  247. <para>
  248.  
  249. </para><informaltable pgwide=1 frame="none" role="params">
  250. <tgroup cols="2">
  251. <colspec colwidth="2*">
  252. <colspec colwidth="8*">
  253. <tbody>
  254. <row><entry align="right"><parameter>channel_ID</parameter> :</entry>
  255. <entry> The channel.
  256. </entry></row>
  257. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  258. </entry></row>
  259. </tbody></tgroup></informaltable></refsect2>
  260. <refsect2>
  261. <title><anchor id="gimp-selection-save">gimp_selection_save ()</title>
  262. <programlisting><link linkend="gint32">gint32</link>      gimp_selection_save             (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  263. <para>
  264. Copy the selection mask to a new channel.
  265. </para>
  266. <para>
  267. This procedure copies the selection mask and stores the content in a
  268. new channel. The new channel is automatically inserted into the
  269. image's list of channels.</para>
  270. <para>
  271.  
  272. </para><informaltable pgwide=1 frame="none" role="params">
  273. <tgroup cols="2">
  274. <colspec colwidth="2*">
  275. <colspec colwidth="8*">
  276. <tbody>
  277. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  278. <entry> The image.
  279. </entry></row>
  280. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The new channel.
  281. </entry></row>
  282. </tbody></tgroup></informaltable></refsect2>
  283. <refsect2>
  284. <title><anchor id="gimp-selection-value">gimp_selection_value ()</title>
  285. <programlisting><link linkend="gint">gint</link>        gimp_selection_value            (<link linkend="gint32">gint32</link> image_ID,
  286.                                              <link linkend="gint">gint</link> x,
  287.                                              <link linkend="gint">gint</link> y);</programlisting>
  288. <para>
  289. Find the value of the selection at the specified coordinates.
  290. </para>
  291. <para>
  292. This procedure returns the value of the selection at the specified
  293. coordinates. If the coordinates lie out of bounds, 0 is returned.</para>
  294. <para>
  295.  
  296. </para><informaltable pgwide=1 frame="none" role="params">
  297. <tgroup cols="2">
  298. <colspec colwidth="2*">
  299. <colspec colwidth="8*">
  300. <tbody>
  301. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  302. <entry> The image.
  303. </entry></row>
  304. <row><entry align="right"><parameter>x</parameter> :</entry>
  305. <entry> x coordinate of value.
  306. </entry></row>
  307. <row><entry align="right"><parameter>y</parameter> :</entry>
  308. <entry> y coordinate of value.
  309. </entry></row>
  310. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> Value of the selection.
  311. </entry></row>
  312. </tbody></tgroup></informaltable></refsect2>
  313. <refsect2>
  314. <title><anchor id="gimp-selection-grow">gimp_selection_grow ()</title>
  315. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_grow             (<link linkend="gint32">gint32</link> image_ID,
  316.                                              <link linkend="gint">gint</link> steps);</programlisting>
  317. <para>
  318. Grow the image's selection
  319. </para>
  320. <para>
  321. This procedure grows the selection. Growing involves expanding the
  322. boundary in all directions by the specified pixel amount.</para>
  323. <para>
  324.  
  325. </para><informaltable pgwide=1 frame="none" role="params">
  326. <tgroup cols="2">
  327. <colspec colwidth="2*">
  328. <colspec colwidth="8*">
  329. <tbody>
  330. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  331. <entry> The image.
  332. </entry></row>
  333. <row><entry align="right"><parameter>steps</parameter> :</entry>
  334. <entry> Steps of grow (in pixels).
  335. </entry></row>
  336. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  337. </entry></row>
  338. </tbody></tgroup></informaltable></refsect2>
  339. <refsect2>
  340. <title><anchor id="gimp-selection-shrink">gimp_selection_shrink ()</title>
  341. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_shrink           (<link linkend="gint32">gint32</link> image_ID,
  342.                                              <link linkend="gint">gint</link> radius);</programlisting>
  343. <para>
  344. Shrink the image's selection
  345. </para>
  346. <para>
  347. This procedure shrinks the selection. Shrinking invovles trimming
  348. the existing selection boundary on all sides by the specified number
  349. of pixels.</para>
  350. <para>
  351.  
  352. </para><informaltable pgwide=1 frame="none" role="params">
  353. <tgroup cols="2">
  354. <colspec colwidth="2*">
  355. <colspec colwidth="8*">
  356. <tbody>
  357. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  358. <entry> The image.
  359. </entry></row>
  360. <row><entry align="right"><parameter>radius</parameter> :</entry>
  361. <entry> Radius of shrink (in pixels).
  362. </entry></row>
  363. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  364. </entry></row>
  365. </tbody></tgroup></informaltable></refsect2>
  366. <refsect2>
  367. <title><anchor id="gimp-selection-invert">gimp_selection_invert ()</title>
  368. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_invert           (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  369. <para>
  370. Invert the selection mask.
  371. </para>
  372. <para>
  373. This procedure inverts the selection mask. For every pixel in the
  374. selection channel, its new value is calculated as (255 - old_value).</para>
  375. <para>
  376.  
  377. </para><informaltable pgwide=1 frame="none" role="params">
  378. <tgroup cols="2">
  379. <colspec colwidth="2*">
  380. <colspec colwidth="8*">
  381. <tbody>
  382. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  383. <entry> The image.
  384. </entry></row>
  385. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  386. </entry></row>
  387. </tbody></tgroup></informaltable></refsect2>
  388. <refsect2>
  389. <title><anchor id="gimp-selection-feather">gimp_selection_feather ()</title>
  390. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_feather          (<link linkend="gint32">gint32</link> image_ID,
  391.                                              <link linkend="gdouble">gdouble</link> radius);</programlisting>
  392. <para>
  393. Feather the image's selection
  394. </para>
  395. <para>
  396. This procedure feathers the selection. Feathering is implemented
  397. using a gaussian blur.</para>
  398. <para>
  399.  
  400. </para><informaltable pgwide=1 frame="none" role="params">
  401. <tgroup cols="2">
  402. <colspec colwidth="2*">
  403. <colspec colwidth="8*">
  404. <tbody>
  405. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  406. <entry> The image.
  407. </entry></row>
  408. <row><entry align="right"><parameter>radius</parameter> :</entry>
  409. <entry> Radius of feather (in pixels).
  410. </entry></row>
  411. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  412. </entry></row>
  413. </tbody></tgroup></informaltable></refsect2>
  414. <refsect2>
  415. <title><anchor id="gimp-selection-sharpen">gimp_selection_sharpen ()</title>
  416. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_sharpen          (<link linkend="gint32">gint32</link> image_ID);</programlisting>
  417. <para>
  418. Sharpen the selection mask.
  419. </para>
  420. <para>
  421. This procedure sharpens the selection mask. For every pixel in the
  422. selection channel, if the value is > 0, the new pixel is assigned a
  423. value of 255. This removes any \"anti-aliasing\" that might exist in
  424. the selection mask's boundary.</para>
  425. <para>
  426.  
  427. </para><informaltable pgwide=1 frame="none" role="params">
  428. <tgroup cols="2">
  429. <colspec colwidth="2*">
  430. <colspec colwidth="8*">
  431. <tbody>
  432. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  433. <entry> The image.
  434. </entry></row>
  435. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  436. </entry></row>
  437. </tbody></tgroup></informaltable></refsect2>
  438. <refsect2>
  439. <title><anchor id="gimp-selection-border">gimp_selection_border ()</title>
  440. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_border           (<link linkend="gint32">gint32</link> image_ID,
  441.                                              <link linkend="gint">gint</link> radius);</programlisting>
  442. <para>
  443. Border the image's selection
  444. </para>
  445. <para>
  446. This procedure borders the selection. Bordering creates a new
  447. selection which is defined along the boundary of the previous
  448. selection at every point within the specified radius.</para>
  449. <para>
  450.  
  451. </para><informaltable pgwide=1 frame="none" role="params">
  452. <tgroup cols="2">
  453. <colspec colwidth="2*">
  454. <colspec colwidth="8*">
  455. <tbody>
  456. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  457. <entry> The image.
  458. </entry></row>
  459. <row><entry align="right"><parameter>radius</parameter> :</entry>
  460. <entry> Radius of border (in pixels).
  461. </entry></row>
  462. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  463. </entry></row>
  464. </tbody></tgroup></informaltable></refsect2>
  465. <refsect2>
  466. <title><anchor id="gimp-selection-translate">gimp_selection_translate ()</title>
  467. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_translate        (<link linkend="gint32">gint32</link> image_ID,
  468.                                              <link linkend="gint">gint</link> offx,
  469.                                              <link linkend="gint">gint</link> offy);</programlisting>
  470. <para>
  471. Translate the selection by the specified offsets.
  472. </para>
  473. <para>
  474. This procedure actually translates the selection for the specified
  475. image by the specified offsets. Regions that are translated from
  476. beyond the bounds of the image are set to empty. Valid regions of
  477. the selection which are translated beyond the bounds of the image
  478. because of this call are lost.</para>
  479. <para>
  480.  
  481. </para><informaltable pgwide=1 frame="none" role="params">
  482. <tgroup cols="2">
  483. <colspec colwidth="2*">
  484. <colspec colwidth="8*">
  485. <tbody>
  486. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  487. <entry> The image.
  488. </entry></row>
  489. <row><entry align="right"><parameter>offx</parameter> :</entry>
  490. <entry> x offset for translation.
  491. </entry></row>
  492. <row><entry align="right"><parameter>offy</parameter> :</entry>
  493. <entry> y offset for translation.
  494. </entry></row>
  495. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  496. </entry></row>
  497. </tbody></tgroup></informaltable></refsect2>
  498. <refsect2>
  499. <title><anchor id="gimp-selection-layer-alpha">gimp_selection_layer_alpha ()</title>
  500. <programlisting><link linkend="gboolean">gboolean</link>    gimp_selection_layer_alpha      (<link linkend="gint32">gint32</link> layer_ID);</programlisting>
  501. <para>
  502. Transfer the specified layer's alpha channel to the selection mask.
  503. </para>
  504. <para>
  505. This procedure requires a layer with an alpha channel. The alpha
  506. channel information is used to create a selection mask such that for
  507. any pixel in the image defined in the specified layer, that layer
  508. pixel's alpha value is transferred to the selection mask. If the
  509. layer is undefined at a particular image pixel, the associated
  510. selection mask value is set to 0.</para>
  511. <para>
  512.  
  513. </para><informaltable pgwide=1 frame="none" role="params">
  514. <tgroup cols="2">
  515. <colspec colwidth="2*">
  516. <colspec colwidth="8*">
  517. <tbody>
  518. <row><entry align="right"><parameter>layer_ID</parameter> :</entry>
  519. <entry> Layer with alpha.
  520. </entry></row>
  521. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  522. </entry></row>
  523. </tbody></tgroup></informaltable></refsect2>
  524.  
  525. </refsect1>
  526.  
  527.  
  528.  
  529.  
  530. </refentry>
  531.